﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Newtonsoft.Json;
using System.Text;

public partial class NewsContent : Basic
{
    public string strCon = "";
    public string strClass = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        long id = OTO.ToLong(Request["id"], 0);
        string tid = OTO.ToStr(Request["tid"], "0401");

        strClass = Pub.LoadData(jsonUrl + "news/TypeNameByTypeId.ashx?typeid=" + tid);


        strCon = sb文章内容(id).ToString();
    }


    protected StringBuilder sb文章内容(long id)
    {
        StringBuilder sb = new StringBuilder();
        try
        {
            NewsContentEnty obj2 = JsonConvert.DeserializeObject<NewsContentEnty>(Pub.LoadData(jsonUrl + "/news/UNews.ashx?id=" + id));
            if (obj2 != null)
            {
                sb.AppendFormat("<div class=\"title mt20\">{0}</div>",obj2.Title);
                sb.AppendFormat("<div class=\"right_content mt20\">{0}</div>", obj2.Content);
            }
            else
            {
                sb.AppendFormat("<div class=\"right_content mt20\">&nbsp;&nbsp;</div>");
            }
        }
        catch { }
        return sb;
    }

}